using System;
using NUnit.Framework;

namespace ProgrammingLanguageNr1
{
	public class Symbol
	{
		public Symbol (string name)
		{
			m_name = name;
		}
		
		public Symbol (string name, SprakType type) {
			Assert.IsNotNull(type);
			m_name = name;
			m_type = type;
		}
		
		public string getName() { return m_name; }
		public SprakType getType() { return m_type; }
		
		public override string ToString() {
			if (m_type != null) {
				return "<" + getName() + ":" + m_type + ">";
			} else {
				return getName();
			}
		}
		
		string m_name;
		SprakType m_type;
	}
}

